package com.example.my_flea_street.Mapper;

import com.example.my_flea_street.bean.Info;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


@Mapper
@Repository
public interface CategoryMapper {
    @Select("SELECT b.id ,b.release_time,b.text,b.pic,b.category,b.key_word,b.is_settled,b.is_banned,b.user_id,a.name,a.sex,a.head FROM user a,information b WHERE a.id=b.user_id and b.category=#{category} ORDER BY release_time desc")
    Page<Info> getInfo(@Param("category") int category);
}
